# Author:: Alexandre Ribeiro de Souza (<alexandre@lumis.com.br>)

::Chef::Recipe.send(:include, Opscode::Aws::Ec2)

aws = data_bag_item("aws", "knife-user")

s3 = RightAws::S3Interface.new(aws['aws_access_key_id'], aws['aws_secret_access_key'], { :logger => Chef::Log})
s3.create_bucket(Chef::Config[:node_name])

Chef::Log.info("S3 Bucket #{Chef::Config[:node_name]}")
